/*
    repeat.c
        使用循环语句解决问题
    BeginnerC
*/
#include <stdio.h>
int main()
{
    printf("for :\n");
    for (int i = 0;i < 10;i++)
    {
        printf ("i = %d\n", i);
    }
    printf("while :\n");
    {
        int i = 0;
        while (i < 10)
        {
            printf ("i = %d\n", i);
            i++;
        }
    }
    printf("do-while :\n");
    {
        int i = 0;
        do
        {
            printf ("i = %d\n", i);
            i++;
        }
        while (i < 10);
    }
    return 0;
}